package com.fas.core.plugin.datatables;
import java.util.HashMap;
import java.util.List;

import com.jfinal.plugin.activerecord.Record;
/**
 * Jquery datatables 表格插件，异步查询响应数据结构封装
 * 
 * @Copyright: Copyright (c) 2015 Knight 
 * @anthor yixiaoping<thinker1013@163.com>
 * @since 2015年10月16日 下午2:40:06
 * @version V1.0
 */
public class PageResponse {
	private int sEcho;
	private int iTotalRecords;
	private int iTotalDisplayRecords;
	private List<Record> aaData;
	private HashMap<String,Object> userData;
	
	public PageResponse() {
		super();
		userData= new HashMap<String,Object>();
	}
	public PageResponse(int echo, int totalRecords, int totalDisplayRecords,
			List<Record> aaData) {
		super();
		sEcho = echo;
		iTotalRecords = totalRecords;
		iTotalDisplayRecords = totalDisplayRecords;
		this.aaData = aaData;
	}
	public int getSEcho() {
		return sEcho;
	}
	public void setSEcho(int echo) {
		sEcho = echo;
	}
	public int getITotalRecords() {
		return iTotalRecords;
	}
	public void setITotalRecords(int totalRecords) {
		iTotalRecords = totalRecords;
	}
	public int getITotalDisplayRecords() {
		return iTotalDisplayRecords;
	}
	public void setITotalDisplayRecords(int totalDisplayRecords) {
		iTotalDisplayRecords = totalDisplayRecords;
	}
	public List<Record> getAaData() {
		return aaData;
	}
	public void setAaData(List<Record> aaData) {
		this.aaData = aaData;
	}
	public HashMap<String, Object> getUserData() {
		return userData;
	}
	public void setUserData(HashMap<String, Object> userData) {
		this.userData = userData;
	}
	
	public void addUserDataItem(String key,Object value){
		this.userData.put(key, value);
	}
}
